//  Copyright (c) 2010 by Dolphin Technology
//  All rights served.
//
//  Copyright Notification
//  No part may be reproduced except as authorized by written permission.
// 
//% @file   dti_lfsr_tb.v
//% @par    Company:
//%             Dolphin Technology 
//% @par    Project:
//%             [projectname]
//% @par    Author:
//%             N. Huy Bui
//% @par    Date:
//%             July 9, 2012
//% @brief
//%             testbench for [dti_lfsr_load] module
//$Id$

module dti_lfsr_tb;
parameter 	  WIDTH       = 4;
reg 		  clk_tb;
reg 		  arst_n_tb;
reg 		  c_en_tb;
reg 		  load_n_tb;
reg 	  [WIDTH-1:0] data_in_tb;

wire 	  [WIDTH-1:0] count_tb;

initial 
begin
  clk_tb = 0;
  arst_n_tb = 0;
  c_en_tb = 1;
  load_n_tb = 1;
  data_in_tb = 4'b0001;
  #12 arst_n_tb = 1;
  #50 load_n_tb = 0;
  #20 data_in_tb = 4'b0100;
  #30 c_en_tb = 0;
  #20 c_en_tb = 1;
  #10 load_n_tb = 1;
  #20 $finish;
end

always #5 clk_tb = ~clk_tb;

dti_lfsr_load DUT (
  .clk 		(clk_tb),
  .arst_n 	(arst_n_tb),
  .c_en 	(c_en_tb),
  .load_n 	(load_n_tb),
  .data_in 	(data_in_tb),
  .count 	(count_tb));

endmodule // dti_lfsr_tb
